package com.example.diskmonitor.dto;

import java.util.List;

/**
 * 分页响应数据传输对象
 * 用于封装分页查询结果，包含数据列表和分页元信息
 */
public class PaginationResponseDTO<T> {
    // 数据列表
    private List<T> data;
    
    // 总记录数
    private long totalElements;
    
    // 总页数
    private int totalPages;
    
    // 当前页码
    private int currentPage;
    
    // 每页大小
    private int pageSize;

    // 默认构造函数
    public PaginationResponseDTO() {
    }

    // Getter和Setter方法
    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public long getTotalElements() {
        return totalElements;
    }

    public void setTotalElements(long totalElements) {
        this.totalElements = totalElements;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}